Optimal. Leaf size=107 \[ \frac {i e^{-i d} f^a \sqrt {\pi } \text {Erf}\left (x \sqrt {i f-c \log (f)}\right )}{4 \sqrt {i f-c \log (f)}}-\frac {i e^{i d} f^a \sqrt {\pi } \text {Erfi}\left (x \sqrt {i f+c \log (f)}\right )}{4 \sqrt {i f+c \log (f)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4560, 2325,
2236, 2235} \begin {gather*} \frac {i \sqrt {\pi } e^{-i d} f^a \text {Erf}\left (x \sqrt {-c \log (f)+i f}\right )}{4 \sqrt {-c \log (f)+i f}}-\frac {i \sqrt {\pi } e^{i d} f^a \text {Erfi}\left (x \sqrt {c \log (f)+i f}\right )}{4 \sqrt {c \log (f)+i f}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2235
Rule 2236
Rule 2325
Rule 4560
Rubi steps
\begin {align*} \int f^{a+c x^2} \sin \left (d+f x^2\right ) \, dx &=\int \left (\frac {1}{2} i e^{-i d-i f x^2} f^{a+c x^2}-\frac {1}{2} i e^{i d+i f x^2} f^{a+c x^2}\right ) \, dx\\ &=\frac {1}{2} i \int e^{-i d-i f x^2} f^{a+c x^2} \, dx-\frac {1}{2} i \int e^{i d+i f x^2} f^{a+c x^2} \, dx\\ &=\frac {1}{2} i \int e^{-i d+a \log (f)-x^2 (i f-c \log (f))} \, dx-\frac {1}{2} i \int e^{i d+a \log (f)+x^2 (i f+c \log (f))} \, dx\\ &=\frac {i e^{-i d} f^a \sqrt {\pi } \text {erf}\left (x \sqrt {i f-c \log (f)}\right )}{4 \sqrt {i f-c \log (f)}}-\frac {i e^{i d} f^a \sqrt {\pi } \text {erfi}\left (x \sqrt {i f+c \log (f)}\right )}{4 \sqrt {i f+c \log (f)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.52, size = 170, normalized size = 1.59 \begin {gather*} -\frac {\sqrt [4]{-1} f^a \sqrt {\pi } \left (\text {Erfi}\left (\sqrt [4]{-1} x \sqrt {f-i c \log (f)}\right ) \sqrt {f-i c \log (f)} (f+i c \log (f)) (\cos (d)+i \sin (d))+\sqrt {f+i c \log (f)} \left (c \text {Erf}\left (\frac {(1+i) x \sqrt {f+i c \log (f)}}{\sqrt {2}}\right ) \log (f) \sin (d)+\text {Erfi}\left ((-1)^{3/4} x \sqrt {f+i c \log (f)}\right ) (\cos (d) (i f+c \log (f))+f \sin (d))\right )\right )}{4 \left (f^2+c^2 \log ^2(f)\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 84, normalized size = 0.79
method | result | size |
risch | \(-\frac {i \sqrt {\pi }\, f^{a} {\mathrm e}^{i d} \erf \left (\sqrt {-c \ln \left (f \right )-i f}\, x \right )}{4 \sqrt {-c \ln \left (f \right )-i f}}+\frac {i \sqrt {\pi }\, f^{a} {\mathrm e}^{-i d} \erf \left (x \sqrt {i f -c \ln \left (f \right )}\right )}{4 \sqrt {i f -c \ln \left (f \right )}}\) | \(84\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 209 vs. \(2 (73) = 146\).
time = 0.28, size = 209, normalized size = 1.95 \begin {gather*} \frac {\sqrt {\pi } \sqrt {2 \, c^{2} \log \left (f\right )^{2} + 2 \, f^{2}} {\left (f^{a} {\left (\cos \left (d\right ) - i \, \sin \left (d\right )\right )} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) + i \, f} x\right ) + f^{a} {\left (\cos \left (d\right ) + i \, \sin \left (d\right )\right )} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) - i \, f} x\right )\right )} \sqrt {c \log \left (f\right ) + \sqrt {c^{2} \log \left (f\right )^{2} + f^{2}}} - \sqrt {\pi } \sqrt {2 \, c^{2} \log \left (f\right )^{2} + 2 \, f^{2}} {\left (f^{a} {\left (-i \, \cos \left (d\right ) - \sin \left (d\right )\right )} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) + i \, f} x\right ) + f^{a} {\left (i \, \cos \left (d\right ) - \sin \left (d\right )\right )} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) - i \, f} x\right )\right )} \sqrt {-c \log \left (f\right ) + \sqrt {c^{2} \log \left (f\right )^{2} + f^{2}}}}{8 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.79, size = 107, normalized size = 1.00 \begin {gather*} \frac {\sqrt {\pi } {\left (i \, c \log \left (f\right ) + f\right )} \sqrt {-c \log \left (f\right ) - i \, f} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) - i \, f} x\right ) e^{\left (a \log \left (f\right ) + i \, d\right )} + \sqrt {\pi } {\left (-i \, c \log \left (f\right ) + f\right )} \sqrt {-c \log \left (f\right ) + i \, f} \operatorname {erf}\left (\sqrt {-c \log \left (f\right ) + i \, f} x\right ) e^{\left (a \log \left (f\right ) - i \, d\right )}}{4 \, {\left (c^{2} \log \left (f\right )^{2} + f^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int f^{a + c x^{2}} \sin {\left (d + f x^{2} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int f^{c\,x^2+a}\,\sin \left (f\,x^2+d\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________